package br.inf.solutions.apresentacoes.ssp.model;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.CascadeType;

import br.com.vexillum.model.CommonEntityActivated;

@SuppressWarnings("serial")
@Entity
@Table(name="square_postgraduation")
public class SquarePostGraduation  extends CommonEntityActivated{

	@ManyToOne(fetch=FetchType.LAZY)
	@Cascade(value={CascadeType.SAVE_UPDATE, CascadeType.PERSIST, CascadeType.MERGE})
	@JoinColumn(name="id_posgraduation", nullable=false)
	private PostGraduation postGraduation;
	
	@ManyToOne(fetch=FetchType.LAZY)
	@Cascade(value={CascadeType.SAVE_UPDATE, CascadeType.PERSIST, CascadeType.MERGE})
	@JoinColumn(name="id_square", nullable=false)
	private Square square;
	
	public PostGraduation getPostGraduation() {
		return postGraduation;
	}
	public void setPostGraduation(PostGraduation postGraduation) {
		this.postGraduation = postGraduation;
	}
	public Square getSquare() {
		return square;
	}
	public void setSquare(Square square) {
		this.square = square;
	}
	
}
